Conversation
…ausing div by zero errors
|
@Myoldmopar can we push a new release out here, or should I just point at this SHA for now? |
| if fx == fy: | ||
| return 0, 0, 'equal' |
There was a problem hiding this comment.
Likely will only ever hit this on 0.0 == 0.0 cases, which is fine.
There was a problem hiding this comment.
Interesting. Are there cases where this can still fall through and be a divide by zero? I guess maybe not because if one was non-zero then the IF/ELSE a couple lines below would catch the right direction? Yeah, it looks good.
| </tr> | ||
| <tr> | ||
| <td align="right">Total Site Energy</td> | ||
| <td align="right"> 0.00</td> |
There was a problem hiding this comment.
These entries have an extra leading space.
| self.assertEqual(0, response[7]) # in file 2 but not in file 1 | ||
| self.assertEqual(0, response[8]) # in file 1 but not in file 2 | ||
|
|
||
| def test_files_with_different_spaces(self): |
There was a problem hiding this comment.
Copy/paste from test above.
| self.assertEqual(3, response[1]) # count_of_tables | ||
| self.assertEqual(0, response[2]) # big diffs | ||
| self.assertEqual(0, response[3]) # small diffs | ||
| self.assertEqual(17, response[4]) # equals | ||
| self.assertEqual(0, response[5]) # string diffs | ||
| self.assertEqual(0, response[6]) # size errors | ||
| self.assertEqual(0, response[7]) # in file 2 but not in file 1 | ||
| self.assertEqual(0, response[8]) # in file 1 but not in file 2 |
There was a problem hiding this comment.
A completed run and no diffs, excellent.
| if fx == fy: | ||
| return 0, 0, 'equal' |
There was a problem hiding this comment.
Interesting. Are there cases where this can still fall through and be a divide by zero? I guess maybe not because if one was non-zero then the IF/ELSE a couple lines below would catch the right direction? Yeah, it looks good.
| </tr> | ||
| <tr> | ||
| <td align="right">Total Site Energy</td> | ||
| <td align="right"> 0.00</td> |
Fixes #119